Chris Pollett > Old Classes > CS216
( Print View )

Student Corner:
  [Grades Sec1]

  [Submit Sec1]

  [Class Sign Up Sec1]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HWs and Quizzes:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Quizzes]  [Project]

Practice Exams:
  [Mid]  [Final]

                           












HW#1 --- last modified February 17 2019 19:45:18..

Solution set.

Due date: Feb 9

Files to be submitted:
  Hw1.zip

Purpose: To remember our OpenGL from CS116A or Graphics Course elsewhere. To draw Bezier curves using recursive subdivision method from class.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO2 (Learning Outcome 2) -- Derive point positions from different curve representations

LO3 (Learning Outcome 3) -- Implement different methods of curve subdivision

Specification:

This homework will consist of two files both of which should be contained in the Hw1.zip file that you submit.

The first file should be either Hw1.pdf or Hw1.php (that is either a PDF file or an html file). It should contain your own solutions, meeting the syllabus guidelines on homeworks, for the following problems out of the Buss book: 7.2, 7.3, 7.6.

For the coding part of the homework I want you to write an OpenGL app in C++ using GLUT which when launched draws an ampersand (&) on the screen. The ampersand should be drawn using Bézier curves of degree at least 3. Each Bézier curve should be drawn using the recursive subdivision method described in class. The code for the programming part of the homework should be relatively short, so to keep things simple, submit it in one file: bezier.cpp . i.e., don't even bother to have a header file. The starting point for this file can be the example program we went over in class Feb. 2. To grade your homework, I will take this file and create an XCode project on my Mac and add the OpenGL and GLUT frameworks. If you keep the #ifdef'd headers that I had in my example on a PC or Linux, your code should compile on my Mac. You should not use any libraries other than OpenGL and standard C++ or STL. Your code should also conform to the Departmental Coding Guidelines for C++.

Point Breakdown

Book Problems (2pts each -- 0 not correct, 1 partially correct, 2 completely correct) 6 pts
Departmental Coding Guidelines followed (0 -- more than three ways not followed, .5 -- one or two ways not followed, 1 completely followed) 1 pt
Code contains the recursive subdivision procedure and this correctly splits the given Bézier curve (of degree at least 3) into two Bézier curves. (0 -- does not do this correctly, .5 -- calculation of two sub curves present, but with syntax errors, 1 -- completely works.) 1 pt
Check for the recursive stop condition given in class (1/2pt), draws a line for the Bézier curve when this condition is reached (1/2pt). 1 pt
When the program is launched, the calls to draw Bézier curves actually result in an ampersand being drawn. 1 pt
Total10pts